import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect: '/register'
    },
    {
      path: '/layout',
      name: 'layout',
      component: resolve => require(['@pages/layout/layout.vue'], resolve),
      children:[
        {
          path: '/index',
          name: 'index',
          component: resolve => require(['@pages/index/index.vue'], resolve),
        },
        {
          path: '/register',
          name: 'register',
          component: resolve => require(['@pages/register/register.vue'], resolve),
        }
      ]
    },
    {
      path: '/coursedetail',
      name: 'coursedetail',
      component: resolve => require(['@pages/coursedetail/coursedetail.vue'], resolve),
    },
    // {
    //   path: '/popularize',
    //   name: 'popularize',
    //   component: resolve => require(['@pages/popularize/popularize.vue'], resolve),
    // }
  ]
})
